<?php


class tx_zlib_viewhelper_flexform extends tx_zlib_abstract_viewhelper
{

	/**
	 * Retrieve a flexform value
	 *
	 * Return a value from somewhere inside a FlexForm structure. This is a simple
	 * wrapper for tslib_pibase::pi_getFFvalue().
	 *
	 * @param	string		Field name to extract. Can be given like "test/el/2/test/el/field_templateObject" where each part will dig a level deeper in the FlexForm data.
	 * @param	string		Sheet pointer, eg. "sDEF"
	 * @param	string		Language pointer, eg. "lDEF"
	 * @param	string		Value pointer, eg. "vDEF"
	 * @return	string		The content.
	 */
	public function flexform($fieldName,$sheet='sDEF',$lang='lDEF',$value='vDEF')
	{
		$pi = $this->getPi();
		$T3FlexForm_array = $pi->cObj->data['pi_flexform'];
		return $pi->pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet, $lang, $value);
	}

}


if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/zlib/views/helpers/class.tx_zlib_viewhelper_flexform.php'])	{
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/zlib/views/helpers/class.tx_zlib_viewhelper_flexform.php']);
}
